package com.ac.api.group.vo;

import com.ac.api.group.entity.AcGrouptype;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.List;

/**
 * 角色类型树
 *
 * @Author mzl.
 */
@Data
@ApiModel
public class GroupTypeTreeVo {

    @ApiModelProperty("角色类型id")
    private Integer grouptypeid;

    @ApiModelProperty(value = "角色类型名称(管理员组/普通订单组/vip组)")
    private String grouptypename;

    @ApiModelProperty(value = "描述说明")
    private String description;

    @ApiModelProperty("角色类型模块")
    private List<GroupTypeModuleVo> modules;

    public GroupTypeTreeVo() {
    }

    public GroupTypeTreeVo(AcGrouptype acGrouptype) {
        if (null != acGrouptype) {
            BeanUtils.copyProperties(acGrouptype, this);
            this.grouptypeid = acGrouptype.getId();
            this.grouptypename = acGrouptype.getName();
        }
    }
}
